package com.lyj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyj.pojo.Device;
import com.lyj.pojo.vo.AvailableDeviceVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface DeviceMapper extends BaseMapper<Device> {
    // 根据家庭ID和房间ID查询设备列表
    List<Device> selectByFamilyAndRoom(
            @Param("familyId") Integer familyId,
            @Param("roomId") Integer roomId,
            @Param("isOnline") Integer isOnline);

    // 查询家庭内所有设备
    List<AvailableDeviceVO> selectByFamilyId(@Param("familyId") Integer familyId);
}